<!--
 * @Description: 隧道详情
 * @Author: 0001100986/LiuShuai
 * @Date: 2021-07-26 16:47:46
 * @LastEditTime: 2021-11-17 15:21:56
 * @LastEditors: 0001101008/HuYuxi
-->
<template>
  <table class="info-box">
    <thead>
      <tr>
        <th class="title"></th>
        <th>租户信息</th>
        <th>站点</th>
        <th>设备</th>
        <th>端口</th>
        <th>地址</th>
        <th>AS</th>
        <th>WAN地址</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="title">源端</td>
        <td>{{row.startSiteDgName}}</td>
        <td>{{row.extAttrs.startSiteName}}</td>
        <td>{{row.extAttrs.startNeName}}</td>
        <td>{{row.startWan.toUpperCase()}}</td>
        <td>{{row.startIpsecTunnelIp}}</td>
        <td>{{row.startBgp.jsonKeyPointBgpLocalAs}}</td>
        <td>{{row.startBgp.startWanIp ? row.startBgp.startWanIp: '-'}}</td>
      </tr>
      <tr>
        <td class="title">目的端</td>
        <td>{{row.endSiteDgName}}</td>
        <td>{{row.extAttrs.endSiteName}}</td>
        <td>{{row.extAttrs.endNeName}}</td>
        <td>{{row.endWan.toUpperCase()}}</td>
        <td>{{row.endIpsecTunnelIp}}</td>
        <td>{{row.endBgp.jsonKeyPointBgpLocalAs}}</td>
        <td>{{row.startBgp.endWanIp ? row.startBgp.endWanIp : '-'}}</td>
      </tr>
    </tbody>
  </table>
</template>

<script>
export default {
  props: ['row'],
  data () {
    return {};
  }
};
</script>

<style lang="scss" scoped>
.info-box {
  width: 100%;
  border-top: 1px solid #ebeef5;
  border-left: 1px solid #ebeef5;
  .title {
    width: 100px;
    text-align: center;
    background: #f8f8f9 !important;
  }
  th {
    text-align: center;
    color: #606266;
    background: #f8f8f9 !important;
  }
  tr {
    td {
      padding: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      &:nth-child(2) {
        width: 15%;
      }
      &:nth-child(3) {
        width: 15%;
      }
      &:nth-child(4) {
        width: 10%;
        text-align: center;
      }
      &:nth-child(5) {
        width: 15%;
        text-align: center;
      }
      &:nth-child(6) {
        width: 10%;
        text-align: center;
      }
      &:last-child {
        width: 15%;
        text-align: center;
      }
    }
  }
}
</style>